package com.ruoyi.ifmEnlistIand.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.screeningDate.domain.Performance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ifmEnlistIand.mapper.FirefighterFireTableMapper;
import com.ruoyi.ifmEnlistIand.domain.FirefighterFireTable;
import com.ruoyi.ifmEnlistIand.service.IFirefighterFireTableService;

/**
 * 灭火救援岗位技能科目训练登记Service业务层处理
 *
 * @author ruoyi
 * @date 2024-10-29
 */
@Service
public class FirefighterFireTableServiceImpl implements IFirefighterFireTableService
{
    @Autowired
    private FirefighterFireTableMapper firefighterFireTableMapper;

    /**
     * 查询灭火救援岗位技能科目训练登记
     *
     * @param id 灭火救援岗位技能科目训练登记主键
     * @return 灭火救援岗位技能科目训练登记
     */
    @Override
    public FirefighterFireTable selectFirefighterFireTableById(Long id)
    {
        return firefighterFireTableMapper.selectFirefighterFireTableById(id);
    }

    /**
     * 查询灭火救援岗位技能科目训练登记列表
     *
     * @param firefighterFireTable 灭火救援岗位技能科目训练登记
     * @return 灭火救援岗位技能科目训练登记
     */
    @Override
    public List<FirefighterFireTable> selectFirefighterFireTableList(FirefighterFireTable firefighterFireTable)
    {
        return firefighterFireTableMapper.selectFirefighterFireTableList(firefighterFireTable);
    }

    /**
     * 新增灭火救援岗位技能科目训练登记
     *
     * @param firefighterFireTable 灭火救援岗位技能科目训练登记
     * @return 结果
     */
    @Override
    public int insertFirefighterFireTable(FirefighterFireTable firefighterFireTable)
    {
        firefighterFireTable.setCreateTime(DateUtils.getNowDate());
        return firefighterFireTableMapper.insertFirefighterFireTable(firefighterFireTable);
    }

    /**
     * 修改灭火救援岗位技能科目训练登记
     *
     * @param firefighterFireTable 灭火救援岗位技能科目训练登记
     * @return 结果
     */
    @Override
    public int updateFirefighterFireTable(FirefighterFireTable firefighterFireTable)
    {
        firefighterFireTable.setUpdateTime(DateUtils.getNowDate());
        return firefighterFireTableMapper.updateFirefighterFireTable(firefighterFireTable);
    }

    /**
     * 批量删除灭火救援岗位技能科目训练登记
     *
     * @param ids 需要删除的灭火救援岗位技能科目训练登记主键
     * @return 结果
     */
    @Override
    public int deleteFirefighterFireTableByIds(Long[] ids)
    {
        return firefighterFireTableMapper.deleteFirefighterFireTableByIds(ids);
    }

    /**
     * 删除灭火救援岗位技能科目训练登记信息
     *
     * @param id 灭火救援岗位技能科目训练登记主键
     * @return 结果
     */
    @Override
    public int deleteFirefighterFireTableById(Long id)
    {
        return firefighterFireTableMapper.deleteFirefighterFireTableById(id);
    }

    @Override
    public List<FirefighterFireTable> selectByNameAndId(Performance performance) {
        return firefighterFireTableMapper.selectByNameAndId(performance);
    }
}
